$color-primary: #666;
//基本样式
@import "base";

html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, input, textarea, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  vertical-align: baseline;
}

body {
  background-color: #f2f5e9;
  z-index: -100;
  padding-bottom: 82px;
}

.has-error input[type=text] {
  border-bottom: 1px dashed #a94442 !important;
}

.has-error .simditor-body{
  border: 1px dashed #a94442 !important;
}

.help-block {
  padding: 10px 0px;
  font-size: 12px;
  color: #a94442;
}

.wrap {
  width: 1200px;
  margin: auto;
}

.page {
  background: #fff;
  border: 1px solid #DBDFD6;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);

  //left article list
  .article-list {
    position: fixed;
    border-right: 1px solid #DBDFD6;
    width: 330px;
    background-color: #fff;
    overflow-y: auto;
    a {
      text-decoration: none;
      color: #666;
    }
    li {
      height: 90px;
      border-bottom: 1px solid #eee;
      position: relative;
      display: flex;
      &:hover {
        background-color: #eee;
      }
      p {
        color: #999;
        font-size: 16px;
        line-height: 25px;
        height: 35px;
        position: relative;
        overflow: hidden;
        text-overflow: ellipsis;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        display: -webkit-box;
        padding: 10px {
          left: 20px;
        }
      }
    }
    .drafts {
      .new {
        line-height: 50px;
        border-bottom: 1px solid #eee;
        text-indent: 20px;
        &:hover {
          background-color: #eee;
        }
      }
      a.delete {
        color: #ccc;
        right: 10px;
        bottom: 10px;
        position: absolute;
      }
    }
    .published {
      .title {
        text-indent: 20px;
        color: #666;
        line-height: 50px;
        border-bottom: 1px solid #eee;
      }
      li {
        position: relative;
        p {
          a {
            color: #666;
          }
        }
        a.edit {
          color: #ccc;
          right: 10px;
          bottom: 10px;
          position: absolute;
        }
      }
    }

  }

  .writer {
    .cover {
      img {
        display: block;
      }
    }
    &.preview {
      padding: 20px;
      .title {
        text-align: center;
        color: #333;
        font-size: 18px;
        line-height: 50px;
      }
      .author {
        font-size: 14px;
        line-height: 30px;
        span {
          color: #999;
          font-size: 12px;
        }
      }
      .attachments {
        margin: 20px{
          left: 0px;
          right: 0px;
        }
        border: 1px solid #DBDFD6 {
          left: none;
          right: none;
        }
        p{
          line-height:30px;
          font-size:14px;
          color: #999;
        }
        ul {
          padding-left:20px;
          list-style: none;
          li {
            cursor: pointer;
            &:hover{
              text-decoration: underline;
            }
            color: #666;
            display: flex;
            margin-bottom: 10px;
            .extension-icon {
              flex: 0 0 30px;
            }
          }
        }
      }
      .body {
        color: #666;
        font-size: 14px;
        line-height: 2;
      }
    }
    .plain {
      text-align: center;
      a {
        text-decoration: none;
        color: #e4e4e4;
        font-size: 64px;
        text-shadow: 0 1px 0 white;
        line-height: 300px;
      }
    }
    margin-left: 340px;
    input {
      &[type=text] {
        display: block;
        width: 80%;
        margin: 0 auto;
        border: 0;
        font-size: 22px;
        height: 22px;
        min-height: 22px;
        line-height: 1.4;
        text-align: center;
        overflow: hidden;
        resize: none;
        outline: 0;
        color: #666;
      }
      &.title {
        padding: 20px 0px;
      }
      &.author {
        font-size: 18px;
        padding: 20px 0px;
      }
    }
    .job-title {
      .tabs {
        border: 1px solid #DBDFD6 {
          left: none;
          right: none;
        }
        text-align: center;
        a {
          padding: 0px 8px;
          text-decoration: none;
          font-size: 16px;
          line-height: 3;
          color: #999;
          &:hover, &.active {
            color: #333;
          }
        }
      }
      .tab-content {
        .items {
          display: none;
          &.show {
            display: flex;
          }
          font-size: 14px;
          color: #666;
          flex: 1;
          .left {
            flex: 0 0 150px;
            background-color: #f4f4f4;
            li {
              line-height: 35px;
              text-align: center;
              &.active {
                background-color: #fff;
              }
            }
          }
          .right {
            padding: 20px {
              top: 0px;
            }
            .items {
              display: none;
              &:first-child {
                display: block;
              }
              p {
                color: #333;
                line-height: 40px;
                padding-left: 20px;
              }
              ul {
                li {
                  padding: 0px 20px;
                  margin-bottom: 10px;
                  border-right: 1px solid #DBDFD6;
                  font-size: 13px;
                  list-style: none;
                  display: inline-block;
                  &:last-child {
                    border: none;
                  }
                  &.active {
                    color: #0894ec;
                  }
                }
              }
            }
          }
        }
      }
    }
    .attachments {
      .title {
        border-top: 1px solid #DBDFD6;
        color: #666;
        line-height: 40px;
      }
      .actions {
        a {
          text-decoration: none;
          font-size: 30px;
          line-height: 2;
          padding: 10px 20px;
          color: #666;
        }
      }
      .uploads {
        padding: 20px 50px;
        li {
          list-style: square;
          line-height: 30px;
          a {
            margin-left: 20px;
            color: #666;
            &:hover {
              color: #333;
            }
          }
        }
      }
    }
    .fit-year{
      border-top: 1px solid #DBDFD6;
      padding: 20px;
      color: #666;
      font-size:14px;
      select{
        height: 30px;
        padding: 0px 10px;
        border-radius: 2px;
      }
    }
  }
}

//cover
.page .cover {
  padding: 20px;
  .upload {
    border: 1px solid #ccc;
    text-align: center;
    border-radius: 2px;
    cursor: pointer;
    p.hint {
      color: #b2b2b2;
      min-height: 80px;
      font-size: 18px;
      line-height: 80px;
    }
    &:hover {
      background-color: #f3f3f3;
      transition: all .3s ease;
    }
  }
}

//footer
.footer {
  width: 100%;
  position: fixed;
  z-index: 20;
  bottom: 0px;
  height: 80px;
  background: #fff;
  border: 1px solid #DBDFD6;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  button {
    display: inline-block;
    padding: 6px 40px;
    margin: 0 10px 0 0;
    border: 1px solid #999;
    color: #666;
    background-color: #fff;
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
    -moz-background-clip: padding;
    -webkit-background-clip: padding-box;
    background-clip: padding-box;
    -moz-user-select: none;
    -webkit-user-select: none;
    user-select: none;
  }
  &[disabled] {
    border: 1px solid #f4f4f4;
    background-color: #f4f4f4;
    color: #444;
  }
}
